package com.ant.storage.controller;

import com.ant.storage.common.ResultPage;
import com.ant.storage.pojo.OtherOut;
import com.ant.storage.service.IOtherOutService;
import com.ant.storage.common.PageRecv;
import com.ant.storage.common.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/otherOut")
@Api(tags = "其他出库接口")
public class OtherOutController {
    @Autowired
    private IOtherOutService otherOutService;

    @ApiOperation(value = "添加其他出库单")
    @PostMapping("/addOtherOut")
    public ResultVo addOtherOut(@RequestBody OtherOut otherOut) throws NoSuchFieldException {
        return otherOutService.addOtherOut(otherOut);
    }

    @ApiOperation(value = "查看其他出库单")
    @PostMapping("/queryOtherOut")
    public ResultPage queryOtherOut(@RequestBody PageRecv<OtherOut> pageRecv){
        return otherOutService.queryOtherOut(pageRecv);
    }
}
